package com.sgb.goods.widget.pop.adapter;

import android.content.Context;
import android.widget.TextView;

import com.sgb.goods.BR;
import com.sgb.goods.R;
import com.sgb.goods.entity.GoodsBrandEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

/**
 * 描述：商品品牌弹窗二级品牌数据适配器
 *
 * @author qiangHeNoo
 *
 * 时间：2021.12.09
 */
public class GoodsBrandChildAdapter extends BaseRecycleAdapter<GoodsBrandEntity.GoodsBrandChild> {

    public GoodsBrandChildAdapter(Context context, List<GoodsBrandEntity.GoodsBrandChild> data) {
        super(context, R.layout.goods_item_storage1, data);
    }

    @Override
    public void convert(ItemViewHolder holder, final GoodsBrandEntity.GoodsBrandChild entity) {
        holder.setBinding(BR.viewModel, entity);
        holder.setText(R.id.goods_item_brand, entity.getName());
    }

}
